home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / cvs-1_3.lha / cvs-1.3 / src / rcs.h < prev    next >
C/C++ Source or Header  |  1992-03-31  |  3KB  |  103 lines

  1. /* @(#)rcs.h 1.14 92/03/31     */
  2.  
  3. /*
  4.  * Copyright (c) 1992, Brian Berliner and Jeff Polk
  5.  * Copyright (c) 1989-1992, Brian Berliner
  6.  * 
  7.  * You may distribute under the terms of the GNU General Public License as
  8.  * specified in the README file that comes with the CVS 1.3 kit.
  9.  * 
  10.  * RCS source control definitions needed by rcs.c and friends
  11.  */
  12.  
  13. #define    RCS        "rcs"
  14. #define    RCS_CI        "ci"
  15. #define    RCS_CO        "co"
  16. #define    RCS_RLOG    "rlog"
  17. #define    RCS_DIFF    "rcsdiff"
  18. #define    RCS_MERGE    "merge"
  19. #define    RCS_RCSMERGE    "rcsmerge"
  20. #define    RCS_MERGE_PAT    "^>>>>>>> "    /* runs "grep" with this pattern */
  21. #define    RCSEXT        ",v"
  22. #define    RCSHEAD        "head"
  23. #define    RCSBRANCH    "branch"
  24. #define    RCSSYMBOLS    "symbols"
  25. #define    RCSDATE        "date"
  26. #define    RCSDESC        "desc"
  27. #define    DATEFORM    "%02d.%02d.%02d.%02d.%02d.%02d"
  28. #define    SDATEFORM    "%d.%d.%d.%d.%d.%d"
  29.  
  30. /*
  31.  * Opaque structure definitions used by RCS specific lookup routines
  32.  */
  33. #define VALID    0x1            /* flags field contains valid data */
  34. #define    INATTIC    0x2            /* RCS file is located in the Attic */
  35. struct rcsnode
  36. {
  37.     int refcount;
  38.     int flags;
  39.     char *path;
  40.     char *head;
  41.     char *branch;
  42.     List *symbols;
  43.     List *versions;
  44.     List *dates;
  45. };
  46. typedef struct rcsnode RCSNode;
  47.  
  48. struct rcsversnode
  49. {
  50.     char *version;
  51.     char *date;
  52.     char *next;
  53.     List *branches;
  54. };
  55. typedef struct rcsversnode RCSVers;
  56.  
  57. /*
  58.  * CVS reserves all even-numbered branches for its own use.  "magic" branches
  59.  * (see rcs.c) are contained as virtual revision numbers (within symbolic
  60.  * tags only) off the RCS_MAGIC_BRANCH, which is 0.  CVS also reserves the
  61.  * ".1" branch for vendor revisions.  So, if you do your own branching, you
  62.  * should limit your use to odd branch numbers starting at 3.
  63.  */
  64. #define    RCS_MAGIC_BRANCH    0
  65.  
  66. /*
  67.  * exported interfaces
  68.  */
  69. #if __STDC__
  70. List *RCS_parsefiles (List * files, char *xrepos);
  71. RCSNode *RCS_parse (char *file, char *repos);
  72. RCSNode *RCS_parsercsfile (char *rcsfile);
  73. char *RCS_check_kflag (char *arg);
  74. char *RCS_getdate (RCSNode * rcs, char *date, int force_tag_match);
  75. char *RCS_gettag (RCSNode * rcs, char *tag, int force_tag_match);
  76. char *RCS_getversion (RCSNode * rcs, char *tag, char *date,
  77.               int force_tag_match);
  78. char *RCS_magicrev (RCSNode *rcs, char *rev);
  79. int RCS_isbranch (char *file, char *rev, List *srcfiles);
  80. char *RCS_whatbranch (char *file, char *tag, List *srcfiles);
  81. char *RCS_head (RCSNode * rcs);
  82. int RCS_datecmp (char *date1, char *date2);
  83. time_t RCS_getrevtime (RCSNode * rcs, char *rev, char *date, int fudge);
  84. void RCS_check_tag (char *tag);
  85. void freercsnode (RCSNode ** rnodep);
  86. #else
  87. List *RCS_parsefiles ();
  88. RCSNode *RCS_parse ();
  89. char *RCS_head ();
  90. char *RCS_getversion ();
  91. char *RCS_magicrev ();
  92. int RCS_isbranch ();
  93. char *RCS_whatbranch ();
  94. char *RCS_gettag ();
  95. char *RCS_getdate ();
  96. char *RCS_check_kflag ();
  97. void RCS_check_tag ();
  98. time_t RCS_getrevtime ();
  99. RCSNode *RCS_parsercsfile ();
  100. int RCS_datecmp ();
  101. void freercsnode ();
  102. #endif                /* __STDC__ */
  103.